﻿namespace IOCDemo.IocVersion2;

public interface IContainer
{
    /// <summary>
    /// 获取服务
    /// </summary>
    /// <param name="tag"></param>
    /// <typeparam name="TService"></typeparam>
    /// <returns></returns>
    TService GetService<TService>(string tag = "");
    /// <summary>
    /// 从上下文中检索服务
    /// </summary>
    /// <param name="tag"></param>
    /// <typeparam name="TService"></typeparam>
    /// <returns></returns>
    TService Resovle<TService>(string tag = "");

}